class OneDecorator extends Decorator {
    OneDecorator(Component component) {
        super(component);
    }

    private void before() {
        System.out.println("this method run before doSomething().");
    }

    @Override
    public void doSomething() {
        this.before();
        super.doSomething();
    }
}
